package bench

import "time"

type Foo struct {
	A1, A2 string  // basic type string, 2 fields in 1 line
	A3, A4 *string // basic type pointer
	A5     []byte  // byte slice
}

type Foo1 struct {
	B1 Bar   // another struct
	B2 *Bar  // and its pointer
	E  error // special type error
}

type Foo2 struct {
	F time.Time // external selector field, can only use fmt
	_ int       // empty field _ will be ignored
}

type Foo3 struct {
	G1 []string  // slice
	G2 []*string // pointer slice
	G3 []Bar     // struct slice
	G4 []*Bar    // struct pointer slice

	// NOT RECOMMENDED. Use custom type instead.
	//  // better definition
	//  type Strings []string
	//  type Foo3 struct {
	//      G5 []Strings
	//  }
	G5 [][]string
}

// NOT RECOMMEDED. Builtin fields are not fully supported.
//  // better definition
//  type Bar struct {
//      Baz1 Baz1
//      Baz2 *Baz2
//  }
type Bar struct {
	Baz1  // builtin struct
	*Baz2 // and pointer
}

type Baz1 struct{}

type Baz2 struct {
	M map[string]interface{}
}

func (Bar) Error() string { return "Bar error" }
